package HighLevelFunction

object TryCatch {
  //异常处理
  def main(args: Array[String]): Unit = {
    try{
      val n=10/0
    }catch{
      case e:ArithmeticException=>{
        println("处理异常")
      }
      case e:Exception=>{
        println("发生一般异常")
      }
    }finally{
    println("执行结束")
    }
  }

}
